using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Hosting;
using System.Collections.Generic;

/// <summary>
/// Summary description for ThemeManager
/// </summary>
public class ThemeManager
{
    private static VirtualPathProvider pVPathProvider = HostingEnvironment.VirtualPathProvider;
    private static VirtualDirectory pThemesDirectory;

    public ThemeManager()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public static VirtualDirectory VirtualThemesDirectory
    {
        get
        {
            if (pThemesDirectory != null)
                return pThemesDirectory;

            return pThemesDirectory = pVPathProvider.GetDirectory("~/App_Themes");
        }
    }

    public static List<string> ListAvailableThemes()
    {
        List<string> ret = new List<string>();
        foreach (VirtualDirectory d in VirtualThemesDirectory.Directories)
        {
            ret.Add(d.Name);
        }

        return ret;
    }

}
